package com.jltx.xq.coroutinesapp

import kotlinx.coroutines.Deferred
import retrofit2.Call
import retrofit2.http.*

/**
 * @author jltxseo
 *         Created by junlintianxia on 2019/12/25.
 */
interface ServiceApi {
    companion object {
        const val BASE_URL = "https://api.apiopen.top"
        const val DOMAIN = "Domain-Name: "

        //易源地址标签
        const val DOMAIN_SHOW_API = "domain_show_api"

        //openapi标签
        const val DOMAIN_OPEN_API = "domain_open_api"

        //图片接口地址
        const val OPEN_API_PICTURES_URL = "/getImages"
    }

    @Headers(DOMAIN + DOMAIN_OPEN_API)
    @FormUrlEncoded
    @POST(OPEN_API_PICTURES_URL)
    fun getPicturesAsync(
        @Field("page") page: Int,
        @Field("count") count: Int
    ): Call<OpenApiResponse<List<OpenApiPicture>>>
}